/*
 * @Author: zhangxin 411020991@qq.com
 * @Date: 2023-04-06 09:35:28
 * @LastEditors: zhangxin 411020991@qq.com
 * @LastEditTime: 2023-04-19 09:39:25
 * @FilePath: \CIMS-V6_Frontend\main\src\services\ant-design-pro\login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// @ts-ignore
/* eslint-disable */
import {
  request
} from '@umijs/max';

/** 发送验证码 POST /api/login/captcha */
export async function getFakeCaptcha(
  params,
  options,
) {
  return request('/api/login/captcha', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
/** 登录接口 POST /api/login/account */
export async function login(body, options) {
  return request('/api/login/account', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

export async function loginApi(body, options) {
  return request('/api/JWT/Login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/*+json'
    },
    data: body,
    ...(options || {}),
  });
}
